package com.falcon.modules.domain.bo;

import com.baomidou.mybatisplus.plugins.Page;
import lombok.Data;

@Data
public class MyPage<T> extends Page<T> {
    private int start;
    private int limit;

    private static final int defaultLimit = 10;

    public int getCurrent() {
        return start / (limit > 0 ? limit : defaultLimit) +1;
    }

    public int getSize() {
        return limit > 0 ? limit : defaultLimit;
    }
}
